-- card: 13272 from stack: in.3 -- bmap block id: 0 -- flags: 4000 -- background id: 3241 -- name: SizeCardWindow ----- HyperTalk script ----- on Install get ChooseTargetStack() InstallResource XCMD,SizeCardWindow,it end Install -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=299 top=300 right=322 bottom=438 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Show Pascal Source ----- HyperTalk script ----- on mouseUp set the visible of card field 1 to not the visible of card field 1 if the visible of card field 1 is true then set the name of me to "Hide Pascal Source" else set the name of me to "Show Pascal Source" end mouseUp -- part 3 (field) -- low flags: 81 -- high flags: 2007 -- rect: left=12 top=26 right=298 bottom=491 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 22 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Source -- part contents for background part 16 ----- text ----- SIZECARDWINDOW XCMD version 1.0 Kevin Calhoun SizeCardWindow sets the size of the HyperCard window. If you make the window larger than the standard size of 512 by 342 pixels, HyperCard is unable to use the extra space (this applies to version 1.2.2 and earlier, and to every version of HyperCard until one, which may or may not someday appear, in which this XCMD becomes obsolete). SizeCardWindow is only useful for making the window temporarily smaller, which is desirable, for instance, if you want to see other windows. INVOKING SIZECARDWINDOW SizeCardWindow , SizeCardWindow takes zero, one, or two parameters. If no parameters are passed, SizeCardWindow sets the size of the card window to its standard size, 512 by 342 pixels. If one parameter is passed, SizeCardWindow makes the window horizontalSize pixels wide and 342 pixels tall. If two parameters are passed, SizeCardWindow makes the window horizontalSize pixels wide and verticalSize pixels tall. If either horizontalSize or verticalSize is an empty string, SizeCardWindow substitutes the standard measurement for the dimension it represents. If either horizontalSize or verticalSize is a negative number, SizeCardWindow does nothing. -- part contents for card part 3 ----- text ----- UNIT GotGrafPortWillWreakHavoc; { SizeCardWindow XCMD ©1989 by the Trustees of Dartmouth College } { Written by Kevin Calhoun } { This source compatible with MPW Pascal 3.0 } (* Pascal SizeCardWindow.p Link -m ENTRYPOINT ∂ -o "YourFile" ∂ -rt XCMD=3389 ∂ -sn Main=SizeCardWindow ∂ SizeCardWindow.p.o ∂ "{Libraries}"HyperXLib.o *) {$R-} INTERFACE USES Types, Windows, ToolUtils, HyperXCmd; PROCEDURE EntryPoint(paramPtr: XCMDPtr); IMPLEMENTATION PROCEDURE SizeCardWindow(paramPtr: XCMDPtr); FORWARD; PROCEDURE EntryPoint; BEGIN SizeCardWindow(paramPtr); END; PROCEDURE SizeCardWindow(paramPtr: XCMDPtr); VAR params: INTEGER; cardWindow: WindowPtr; str: Str255; w, h: LONGINT; BEGIN GetPort(GrafPtr(cardWindow)); params := paramPtr^.paramCount; w := 512; h := 342; IF params >= 1 THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[1]^, str); IF LENGTH(str) > 0 THEN w := StrToNum(paramPtr, str); IF params = 2 THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[2]^, str); IF LENGTH(str) > 0 THEN h := StrToNum(paramPtr, str); END; END; IF (w > 0) AND (h > 0) THEN SizeWindow(cardWindow, LoWord(w), LoWord(h), TRUE); paramPtr^.returnValue := PasToZero(paramPtr, 'SizeCardWindow XCMD 1.0, 15 March 1989, ©1989 Dartmouth College'); END; END.